import { createRouter, createWebHistory } from 'vue-router'
import MainLayout from '../layouts/MainLayout.vue'
import HomeView from '../views/HomeView.vue'
import Page1 from "@/views/echarts1.vue";
import Page2 from "@/views/echarts2.vue";
import Page3 from "@/views/echarts3.vue";
import Page4 from "@/views/echarts4.vue";
import Page5 from "@/views/echarts5.vue";
import Framework from "@/views/Framework.vue"
import LineLeft from "@/views/echarts6.vue";
import BarAlone from "@/views/echarts6.vue";

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      component: MainLayout,
      children: [
        {
          path: '',
          name: 'home',
          component: HomeView,
        },
        { 
          path: "page1", 
          name: "Page1", 
          component: Page1 
        },
        { 
          path: "page2", 
          name: "Page2", 
          component: Page2 
        },
        { 
          path: "page3", 
          name: "Page3", 
          component: Page3 
        },
        { 
          path: "page4", 
          name: "Page4", 
          component: Page4 
        },
        { 
          path: "page5", 
          name: "Page5", 
          component: Page5 
        },
        {
          path: "framework",
          name: "Framework",
          component: Framework  
        },
        {
          path: "lineleft",
          name: "LineLeft",
          component: LineLeft
        },
        {
          path: "baralone",
          name: "BarAlone",
          component: BarAlone
        }
      ]
    }
  ],
})

export default router
